<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h4 class="modal-title">算法新增</h4>
</div>
<form id="defaultForm" method="post" class="form-horizontal" action="/project/arithmeticManage/manage_save">
    <div class="modal-body">

        <div class="form-group">
            <label class="col-lg-1 control-label">名称</label>
            <div class="col-lg-6">
                <input type="text" class="form-control" name="name" />
            </div>

            <label class="col-lg-1 control-label">对象</label>
            <div class="col-lg-2">
                <select class="form-control" name="object">
                    <option th:each="parameter:${objects}" th:value="${parameter.id}" th:text="${parameter.name}"></option>
                </select>
            </div>

            <label class="col-lg-1 control-label">版本</label>
            <div class="col-lg-1">
                <input type="text" class="form-control" name="edition" />
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg-1 control-label">备注</label>
            <div class="col-lg-11">
                <input type="text" class="form-control" name="remark"/>
            </div>
        </div>

        <div class="form-group">

            <label class="col-lg-2 control-label" style="text-align: left">输入输出</label>

            <label class="col-lg-2 control-label" style="text-align: center">输入量</label>

            <label class="col-lg-6 control-label" style="text-align: right">输出量</label>

        </div>

        <div class="form-group">

            <iframe id="1" width="100%" height="100%" frameborder="1" class="col-lg-5" style="margin-left:85px;
            " ></iframe>

            <iframe id="2" width="100%" height="100%" frameborder="1" class="col-lg-5" style="margin-left:50px;
            "></iframe>

        </div>

        <div class="form-group">
            <label class="col-lg-2 control-label" style="text-align: left">默认触发条件</label>
            <div class="col-lg-9">
                <input type="text" class="form-control" name="" />
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg-2 control-label" style="text-align: left">是否支持反向控制</label>
            <div class="col-lg-10">
                <label>
                    <input type="checkbox" id="control">
                </label>
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg-2 control-label" style="text-align: left">反向控制默认工序</label>
            <div class="col-lg-10">

                <table class="table table-striped table-bordered">
                    <thead>
                    <tr>
                        <th>顺序</th>
                        <th>操作</th>
                        <th>时长(s)</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td>1</td>
                        <td>
                            <select class="form-control" name="">
                                <option th:each="parameter:${objects}" th:value="${parameter.id}" th:text="${parameter.name}"></option>
                            </select>
                        </td>
                        <td>
                            <input type="text" class="form-control" name="" />
                        </td>
                        <td>
                            <span class="glyphicon glyphicon-chevron-up" aria-hidden="true" style="font-size:20px"></span>
                            <span class="glyphicon glyphicon-chevron-down" aria-hidden="true" style="font-size:20px"></span>
                            <span class="glyphicon glyphicon-plus-sign" aria-hidden="true" style="font-size:20px" ></span>
                            <span class="glyphicon glyphicon-remove-sign" aria-hidden="true" style="font-size:20px" ></span>
                        </td>
                    </tr>
                    <tr>
                        <td>2</td>
                        <td>
                            <select class="form-control" name="object">
                                <option th:each="parameter:${objects}" th:value="${parameter.id}" th:text="${parameter.name}"></option>
                            </select>
                        </td>
                        <td><input type="text" class="form-control" name="" /></td>
                        <td>
                            <span class="glyphicon glyphicon-chevron-up" aria-hidden="true" style="font-size:20px"></span>
                            <span class="glyphicon glyphicon-chevron-down" aria-hidden="true" style="font-size:20px"></span>
                            <span class="glyphicon glyphicon-plus-sign" aria-hidden="true" style="font-size:20px"></span>
                            <span class="glyphicon glyphicon-remove-sign" aria-hidden="true" style="font-size:20px"></span>
                        </td>
                    </tr>

                    </tbody>
                </table>
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg-1 control-label">文件</label>
            <div class="col-lg-9">
                <input type="text" id="filename" class="form-control" name="" />
            </div>
            <div  class="col-lg-2">
                <button class="btn btn-success fileinput-button" type="button">打开</button>
                <input type="file" id="jobData" onchange="loadFile(this.files[0])" style="position:absolute;top:0;left:0;font-size:34px; opacity:0">
            </div>
        </div>


    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="submit" class="btn btn-primary">保存</button>
    </div>
</form>

<script>
    function loadFile(file){
        $("#filename").val(file.name);
    }
//    $("#control").bind('click',function () {
//        if($("#control").)
//    })

</script>